﻿using System.Windows;
using System.Windows.Media;

namespace UploadClient.View
{
    /// <summary>
    /// Extension for the button style: buttonStyle.
    /// </summary>
    class ButtonExtension
    {
        public static DependencyProperty DefaultImageSourceProperty =
            DependencyProperty.RegisterAttached("DefaultImageSource",
                                                typeof(ImageSource),
                                                typeof(ButtonExtension),
                                                new PropertyMetadata(null));

        public static DependencyProperty MouseOverImageSourceProperty =
            DependencyProperty.RegisterAttached("MouseOverImageSource",
                                                typeof(ImageSource),
                                                typeof(ButtonExtension),
                                                new PropertyMetadata(null));

        public static DependencyProperty DisabledImageSourceProperty =
            DependencyProperty.RegisterAttached("DisabledImageSource",
                                                typeof(ImageSource),
                                                typeof(ButtonExtension),
                                                new PropertyMetadata(null));

        public static ImageSource GetDefaultImageSource(DependencyObject target)
        {
            return (ImageSource)target.GetValue(DefaultImageSourceProperty);
        }

        public static void SetDefaultImageSource(DependencyObject target, ImageSource value)
        {
            target.SetValue(DefaultImageSourceProperty, value);
        }

        public static ImageSource GetMouseOverImageSource(DependencyObject target)
        {
            return (ImageSource)target.GetValue(MouseOverImageSourceProperty);
        }

        public static void SetMouseOverImageSource(DependencyObject target, ImageSource value)
        {
            target.SetValue(MouseOverImageSourceProperty, value);
        }

        public static ImageSource GetDisabledImageSource(DependencyObject target)
        {
            return (ImageSource)target.GetValue(DisabledImageSourceProperty);
        }

        public static void SetDisabledImageSource(DependencyObject target, ImageSource value)
        {
            target.SetValue(DisabledImageSourceProperty, value);
        }
    }
}
